<div id="content-container" class="container">
    <div class="row">
        <div class="col-md-3">
            {include file="common/user/sidenav" /}
        </div>
        <div class="col-md-9">
            <div class="panel panel-default">
                <div class="panel-body">
                    <h2 class="page-header">
                        {:__('My formwork')}
                        <a href="{:url('formwork/index')}" target="_blank" class="btn btn-info pull-right">
                            <span class="glyphicon glyphicon-shopping-cart"></span> {:__('Buy')}
                        </a>
                    </h2>
                    {:token()}
                    <div>
                        <table class="table table-striped table-hover hm-table-list">
                            <thead>
                                <tr>
                                    <th>编号</th>
                                    <th>名称</th>
                                    <th>门店</th>
                                    <th>关联小程序</th>
                                    <th>金额</th>
                                    <th>时间</th>
                                    <th>操作</th>
                                </tr>
                            </thead>
                            <tbody>
                                <?php if (!$list->isEmpty()): foreach ($list as $item): ?>
                                    <tr>
                                        <td>{$item.id}</td>
                                        <td>{$item.formwork.title}</td>
                                        <td>
                                            <h4>
                                                <span class="label {$item.shop_type==10?'label-default':'label-primary'}">
                                                    {$item.type}
                                                </span>
                                            <h4>
                                        </td>
                                        <td>{$item.applet.app_name?:'--'}</td>
                                        <td>{$item.pay_price}</td>
                                        <td>{$item.createtime}</td>
                                        <td>
                                            <a href="{:url('order/login',['formwork_order_id'=>$item.id])}" target="_blank" class="btn btn-success btn-xs"> 
                                                <span class="glyphicon glyphicon-share-alt"></span> 登录
                                            </a>
                                        </td>
                                    </tr>
                                <?php endforeach; else: ?>
                                    <tr>
                                        <td colspan="7" class="text-center">暂无记录</td>
                                    </tr>
                                <?php endif; ?>
                            </tbody>
                        </table>
                    </div>
                    <div class="col-lg-12 clearfix">
                        <div class="pull-right"><?= $list->render() ?> </div>
                        <div class="pull-right">
                            <div class="">总记录：<?= $list->total() ?></div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
